<script type="text/javascript" language="javascript">
    (function($) {
        /*whatever jQuery stuff*/
        $(function(){	
            /*Images Upload*/		
            var imgname= new Array();				
            $('#file_upload').uploadify({
                'uploader'  : '<?php echo base_url();?>uploadify.swf',				
                'script'    : '<?php echo base_url();?>uploadify.php',
                'cancelImg' : '<?php echo js_asset_url("uploadify/cancel.png"); ?>',
                'folder'    : "<?php echo substr($this->temp_folder,0,-1);?>",
                'fileExt'   : '*.mp4;*.MP4',
                'fileDesc'  : 'All Files',
				'scriptAccess' : 'always',			
                'auto'      : true,
                'multi'     : true,
                'onComplete' : function(event, ID, fileObj, response, data){
                    imgname.push(response);
                },
                'onAllComplete' : function(event,data) {
					$('<input>').attr({
					    type: 'hidden',
					    id: 'uploadify_store',
					    name: 'uploadify_store',
						value: imgname
					}).appendTo('#SearchForm');
					document.forms["SearchForm"].submit();
                }						
            });
        });
    })(jQuery);	
</script>
<div class="wrap">
 	<div id="icon-index" class="icon32"><br /></div><h2><?php echo ucwords(str_replace('_',' ',$this->uri->segment(1)));?> &raquo; <?php echo ucwords(str_replace('_',' ',$this->uri->segment(2)));?></h2>
</div>
<div id="wpbody-content">
    <div class="metabox-holder" id="dashboard-widgets">
            <div class="inside">
				<div id="filter_panel">
					<form action="<?php echo current_url();?>" method="post" name="SearchForm" id="SearchForm">
					&nbsp;&nbsp;<input type="file" name="file_upload" id="file_upload"/>
					</form>
				</div>
				<div class="tablenav top">
					<div class="alignleft"><input type="button" class="button-primary" onclick="javascript:toggleFilter(this);" value="<?php echo lang('button_add');?>" />&nbsp;<input type="button" value="<?php echo lang('button_delete');?>" class="button-primary" onclick="javascript:delete_Form(this,'ListForm','<?php echo current_url();?>/delete')"/></div>
				</div>		
				<form action="<?php echo current_url();?>/delete" method="post" name="ListForm" id="ListForm">
				<table cellspacing="0" class="wp-list-table widefat fixed">
					<thead>
					<tr>
						<?php 
							echo generate_th_orderby(array(
								array(
									'name' => '<input type="checkbox"/>',
									'templates' => 'checkbox'
								),							
								array(
									'name' => lang('ads_name'),
								),
								array(
									'name' => lang('ads_path_url'),
								)								
							));
						?>
					</tr>
					</thead>
				
					<tfoot>
					<tr>
						<?php 
							echo generate_th_orderby(array(
								array(
									'name' => '<input type="checkbox"/>',
									'templates' => 'checkbox'
								),							
								array(
									'name' => lang('ads_name'),
								),
								array(
									'name' => lang('ads_path_url'),
								)
							));
						?>
					</tr>
					</tfoot>
				
					<tbody>
						<?php
						if(!empty($dataResult)):
							foreach($dataResult as $value):
						?>
							<tr>
								<th class="check-column clean-column" scope="row"><input name="id[]" value="<?php echo $value;?>" type="checkbox" /></th>
								<td class=""><?php echo $value;?></td>
								<td class=""><?php echo other_asset_url('../ads/'.$value);?></td>
							</tr>
							<?php
							endforeach;
						else: //not exists
							?>
							<tr valign="middle" class="alternate"><td colspan="3"><?php echo lang('no_data');?></td></tr>			
						<?php
						endif;
						?>
					</tbody>
				</table>
				<div class="tablenav bottom"></div>				
				</form>
            </div><!-- wpbody inside -->
    </div><!-- wpcontent -->
</div><!-- wpbody-content -->